import request from "@/plugins/service";

function findAll() {
  return request({
    url: '/config/templateFile',
    method: 'GET'
  })
}

function findAllByTemplateId(id) {
  return request({
    url: '/config/template/'+id+'/templateFiles',
    method: 'GET'
  })
}

function saveOne(data) {
  return request({
    url: '/config/templateFile',
    method: 'PUT',
    data
  })
}

function deleteOne(id) {
  return request({
    url: '/config/templateFile/' + id,
    method: 'DELETE'
  })
}

export default {
  findAll,
  findAllByTemplateId,
  saveOne,
  deleteOne
}
